<?php
session_start();
	if(!empty($_GET['action']) && ($_GET['action'] == 'login')){

		$username = $_POST['username'];
		$password = $_POST['password'];

		if($username == 'ceshi1'){
			$_SESSION['database'] = 'docs';
		}else if($username == 'ceshi2'){
			$_SESSION['database'] = 'ec_web_server_docs';	
		}

		header("Location: http://localhost/API_SERVER/docs/"); 
		exit();
	}
?>
<html>
	<head>

	</head>
	<body>
		<form action="?action=login" method="post">
	 		<p><input type="text" name="username" /></p>
			<p><input type="text" name="password" /></p>
			<p><input type="submit" value="登陆" /></p>
		</form>
	</body>
</html>